#include<stdio.h>
#include<stdlib.h>
struct student {
    int name;
    int age;
};

struct teacher {
    char name[20];
    int age;
};
struct class{
	struct student students[5];
	struct teacher Teacher;
};
void printclass(struct class *a)
{
	printf("%s-",a->Teacher.name);
	printf("age%d:\n",a->Teacher.age);
	int j;
	for(j=0;j<5;j++)
	{
		printf("Student%2d-",a->students[j].name);
		printf("Age-%d\n",a->students[j].age);
	}
	printf("\n");
}
void main()
{
	struct class class1,class2;
	sprintf(class1.Teacher.name,"Mr.Wang");
	class1.Teacher.age=35;
	int i;
	for(i=0;i<5;i++)
	{
		class1.students[i].name=i+1;
		class1.students[i].age=18;
	}
	sprintf(class2.Teacher.name,"Mr.Zhang");
	class2.Teacher.age=36;
	for(i=0;i<5;i++)
	{
		class2.students[i].name=i+11;
		class2.students[i].age=19;
	}
	printclass(&class1);
	printclass(&class2);
}
